<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--引入vue-js-->
    <script src="js/plugins/vue/dist/vue.min.js"></script>
    <script src="js/plugins/axios/dist/axios.min.js"></script>
    <script src="js/plugins/common.js"></script>

</head>
<body>
    <div id="app"> <h1>微信跳转</h1></div>

    <script>
        new Vue({
            el:"#app",
            data:{

            },
            methods:{

            },
            mounted(){
                let param = GetRequest();
                console.log(param)
                console.log(param.code)
                this.$http.post("/wxUser/index",param).then(res=>{
                    console.log(res)
                    let {success,message,resultObj} = res.data;
                    if (success){
                        localStorage.setItem("TOKEN",resultObj.token)
                        localStorage.setItem("loginInfo",JSON.stringify(resultObj.loginInfo))
                        location.href = "/index.html"
                    }else {
                        location.href=resultObj;
                    }

                })
            }

        })
    </script>
</body>
</html>